Skip to main content

All Questions

1vote
2answers
140views

Are the exceptions used in BeanValidation/JAX-RS's ExceptionMapper an anti pattern?

I am reading a lot about patterns and code structure and something that bothers me is BeanValidation's way to handle errors. I like Java and think that BeanValidation is easy to use, but it seems to ...
Apollo's user avatar
1vote
2answers
163views

Is passing an ErrorMessage to be populated inside the receiving method an anti-pattern?

I come from a Java background, and my colleague is from .NET. We are working on a Java project and I saw him create a method like this: public Object myMethod(Object[] param1, ErrorMessage ...
lemuel's user avatar
34votes
8answers
15kviews

Is throwing an exception an anti-pattern here?

I just had a discussion over a design choice after a code review. I wonder what your opinions are. There's this Preferences class, which is a bucket for key-value pairs. Null values are legal (that'...
Konrad Morawski's user avatar

close